package com.ruoyi.news.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 新闻对象 news
 * 
 * @author ruoyi
 * @date 2025-01-04
 */
public class News extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Integer id;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 链接 */
    @Excel(name = "链接")
    private String link;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 发表日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发表日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishDate;

    /** 情绪（正面、负面、中性） */
    @Excel(name = "情绪", readConverterExp = "正=面、负面、中性")
    private String sentiment;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setLink(String link) 
    {
        this.link = link;
    }

    public String getLink() 
    {
        return link;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setPublishDate(Date publishDate) 
    {
        this.publishDate = publishDate;
    }

    public Date getPublishDate() 
    {
        return publishDate;
    }
    public void setSentiment(String sentiment) 
    {
        this.sentiment = sentiment;
    }

    public String getSentiment() 
    {
        return sentiment;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("link", getLink())
            .append("content", getContent())
            .append("publishDate", getPublishDate())
            .append("sentiment", getSentiment())
            .toString();
    }
}
